﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.Web;

namespace Model
{

    [MetadataType(typeof(Notice_Metadata))]
    [DisplayName("通知公告")]
    public partial class Notice
    {
        public Notice()
        {
            this.Id = Guid.NewGuid();
            this.AddDate = DateTime.Now;
            this.SetTop = false;
            this.UserId = new Guid(HttpContext.Current.User.Identity.Name);
        }

        public class Notice_Metadata
        {
            [ScaffoldColumn(false)]
            public Guid Id { get; set; }

            [ScaffoldColumn(false)]
            public Guid UserId { get; set; }

            [DisplayName("添加日期")]
            public object AddDate { get; set; }

            [DisplayName("主题")]
            public object Title { get; set; }

            [DisplayName("详细")]
            [DataType(DataType.MultilineText)]
            public object Content { get; set; }

            [DisplayName("置顶")]
            public object SetTop { get; set; }

        }
    }
}
